Optimal. Leaf size=89 \[ -\frac {a \sin ^3(c+d x) \cos (c+d x)}{4 d}-\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8}-\frac {b \sin ^3(c+d x)}{3 d}-\frac {b \sin (c+d x)}{d}+\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3872, 2838, 2592, 302, 206, 2635, 8} \[ -\frac {a \sin ^3(c+d x) \cos (c+d x)}{4 d}-\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8}-\frac {b \sin ^3(c+d x)}{3 d}-\frac {b \sin (c+d x)}{d}+\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 206
Rule 302
Rule 2592
Rule 2635
Rule 2838
Rule 3872
Rubi steps
\begin {align*} \int (a+b \sec (c+d x)) \sin ^4(c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \sin ^3(c+d x) \tan (c+d x) \, dx\\ &=a \int \sin ^4(c+d x) \, dx+b \int \sin ^3(c+d x) \tan (c+d x) \, dx\\ &=-\frac {a \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac {1}{4} (3 a) \int \sin ^2(c+d x) \, dx+\frac {b \operatorname {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac {1}{8} (3 a) \int 1 \, dx+\frac {b \operatorname {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {3 a x}{8}-\frac {b \sin (c+d x)}{d}-\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}-\frac {b \sin ^3(c+d x)}{3 d}-\frac {a \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac {b \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {3 a x}{8}+\frac {b \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b \sin (c+d x)}{d}-\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}-\frac {b \sin ^3(c+d x)}{3 d}-\frac {a \cos (c+d x) \sin ^3(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 86, normalized size = 0.97 \[ \frac {3 a (c+d x)}{8 d}-\frac {a \sin (2 (c+d x))}{4 d}+\frac {a \sin (4 (c+d x))}{32 d}-\frac {b \sin ^3(c+d x)}{3 d}-\frac {b \sin (c+d x)}{d}+\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 79, normalized size = 0.89 \[ \frac {9 \, a d x + 12 \, b \log \left (\sin \left (d x + c\right ) + 1\right ) - 12 \, b \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (6 \, a \cos \left (d x + c\right )^{3} + 8 \, b \cos \left (d x + c\right )^{2} - 15 \, a \cos \left (d x + c\right ) - 32 \, b\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 172, normalized size = 1.93 \[ \frac {9 \, {\left (d x + c\right )} a + 24 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 24 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 33 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 104 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 33 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 104 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.65, size = 96, normalized size = 1.08 \[ -\frac {a \cos \left (d x +c \right ) \left (\sin ^{3}\left (d x +c \right )\right )}{4 d}-\frac {3 a \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {3 a x}{8}+\frac {3 c a}{8 d}-\frac {b \left (\sin ^{3}\left (d x +c \right )\right )}{3 d}-\frac {b \sin \left (d x +c \right )}{d}+\frac {b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 81, normalized size = 0.91 \[ \frac {3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) - 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a - 16 \, {\left (2 \, \sin \left (d x + c\right )^{3} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, \sin \left (d x + c\right )\right )} b}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.88, size = 267, normalized size = 3.00 \[ \frac {3\,a\,\mathrm {atan}\left (\frac {27\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,\left (\frac {27\,a^3}{8}+24\,a\,b^2\right )}+\frac {24\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\frac {27\,a^3}{8}+24\,a\,b^2}\right )}{4\,d}+\frac {2\,b\,\mathrm {atanh}\left (\frac {64\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{9\,a^2\,b+64\,b^3}+\frac {9\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{9\,a^2\,b+64\,b^3}\right )}{d}-\frac {\left (2\,b-\frac {3\,a}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {26\,b}{3}-\frac {11\,a}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {11\,a}{4}+\frac {26\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {3\,a}{4}+2\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \sin ^{4}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________